<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex myhb_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center myhb_fd0_0'>
				</view>
				<text class='myhb_fd0_1'>个人中心</text>
				<view class='flex flex-wrap align-center justify-end myhb_fd0_0'>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="flex flex-wrap align-start benben-flex-layout myhb_flex_1">
				<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
					<view class='flex flex-wrap align-center' v-if="isLogin===true" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/wd/myInfo/myInfo`">
						<image class='myhb_fd1_0_c0_c0' mode="aspectFit" :src='dataMessage.avatar'></image>
						<view class='flex flex-direction flex-wrap align-stretch flex-sub myhb_fd1_0_c0_c1'>
							<text class='myhb_fd1_0_c0_c1_c0'>{{dataMessage.nickname}}
								<image src="/static/images/404.png" mode="" style="width: 25rpx;height: 25rpx;margin-left: 24rpx;" v-if="dataMessage.gender==1"></image>
								<image src="/static/images/405.png" mode="" style="width: 25rpx;height: 25rpx;margin-left: 24rpx;" v-if="dataMessage.gender==2"></image>
							</text>
							<view class='flex flex-wrap align-center myhb_fd1_0_c0_c1_c1'>
								<text class='myhb_fd1_0_c0_c1_c1_c0'>{{dataMessage._mobile}}</text>
							</view>
						</view>
					</view>
					<view class='flex flex-wrap align-center' v-if="isLogin===false" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/tabBar/loginnew/loginnew`">
						<image class='myhb_fd1_0_c0_c0' mode="aspectFit" src='http://api.muxiangcl.com/logo.png'></image>
						<view class='flex flex-direction flex-wrap align-stretch flex-sub myhb_fd1_0_c0_c1'>
							<view class='flex flex-wrap align-center'>
								<text class='myhb_fd1_0_c1_c1_c0_c0'>请登录</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center myhb_flex_2">
				<view class='flex flex-wrap align-center myhb_fd2_0'>
					<view class='flex flex-wrap align-center justify-between myhb_fd2_0_c0' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/xtsz/guomingshi/guomingshi?type=${1}`">
						<view class='flex flex-wrap align-center'>
							<text class='myhb_fd2_0_c0_c0_c0'>过敏史</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<image class='myhb_fd2_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"513.png"'></image>
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between myhb_fd2_0_c0' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/xtsz/guomingshi/guomingshi?type=${2}`">
						<view class='flex flex-wrap align-center'>
							<text class='myhb_fd2_0_c0_c0_c0'>既往病史</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<image class='myhb_fd2_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"513.png"'></image>
						</view>
					</view>
					<view class='flex flex-wrap align-center justify-between myhb_fd2_0_c0' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/xtsz/aboutUs/aboutUs`">
						<view class='flex flex-wrap align-center'>
							<text class='myhb_fd2_0_c0_c0_c0'>关于我们</text>
						</view>
						<view class='flex flex-wrap align-center'>
							<image class='myhb_fd2_0_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"513.png"'></image>
						</view>
					</view>
				</view>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"dataMessage": {
					"invite_code": "",
					"address": "",
					"address_code": "",
					"hobby": "",
					"tags": "",
					"id": "",
					"userlevel_id": "",
					"mobile": "",
					"real_name": "",
					"avatar": "",
					"account": "",
					"email": "",
					"birthday": "",
					"gender": "",
					"create_time": "",
					"user_money": "",
					"freeze_money": "",
					"total_consumption_money": "",
					"score": "",
					"_mobile": "",
					"coupon": "",
					"collection_count": "",
					"browse_count": "",
					"total_money": "",
					"certified": "",
					"nickname": "",
					"is_pay_password": "",
					"follow_count": ""
				},
				"dataDetails": {
					"aid": "",
					"name": "",
					"levelid": "",
					"empirical": "",
					"icon": "",
					"discount": "",
					"content": "",
					"total_consumption_money": "",
					"intro": "",
					"speed": "",
					"next_speed": ""
				},
				"dataList": {
					"share_total": "",
					"self_total": ""
				},
				"shopStat": "",
				"shopStateTitle": "商家入驻",
				"dataNum": {
					"no_pay": "",
					"deliver": "",
					"receiv": "",
					"refund": "",
					"evaluate": ""
				},
				"ShopState": {
					"joinin_state": "",
					"reason": ""
				},
				"dataKefu": {
					"chat_url": ""
				},
				"messageNum": {
					"article": "",
					"message": "",
					"chat": "",
					"all": ""
				},
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			isLogin() {
				return this.$store.state.token == '' ? false : true;
			},
		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			if(this.isLogin==true){
				this.queryMessageFunc();
			}
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//个人中心-获取会员详细信息
			async queryMessageFunc() {
				if (this.isLogin === true) {
					//请求方法
					//数据验证

					let datadataMessage = await this.$api.get(global.apiUrls.post5c78c4772da97, {

					});

					if (datadataMessage.data.code != 1) {
						this.$message.info(datadataMessage.data.msg);
						return
					}
					let infodataMessage = datadataMessage.data;
					this.dataMessage = infodataMessage.data
				}
			},
			//用户管理-会员当前等级详情
			async queryDetailsFunc() {
				if (this.isLogin === true) {
					//请求方法
					//数据验证

					let datadataDetails = await this.$api.get(global.apiUrls.post636de668c7eb0, {

					});

					if (datadataDetails.data.code != 1) {
						this.$message.info(datadataDetails.data.msg);
						return
					}
					let infodataDetails = datadataDetails.data;
					this.dataDetails = infodataDetails.data

				}
			},
			//钱包-获取分享赚/自购返累计金额（我的）
			async queryListFunc() {
				if (this.isLogin === true) {
					//请求方法
					//数据验证

					let datadataList = await this.$api.get(global.apiUrls.post64254d2ad5999, {

					});

					if (datadataList.data.code != 1) {
						this.$message.info(datadataList.data.msg);
						return
					}
					let infodataList = datadataList.data;
					this.dataList = infodataList.data

				}
			},
			//跳转资料
			goziliaoFunc() {
				if (this.isLogin === true) {
					this.$urouter.navigateTo(`/pages/wd/myInfo/myInfo`);
				} else {
					this.toLoginDiy();
				}
			},
			//获取未读消息数量
			async getMessageNumFunc() {
				if (this.isLogin === true) {
					//请求方法
					//数据验证

					let datamessageNum = await this.$api.get(global.apiUrls.post64241ca6cf066, {

					});

					if (datamessageNum.data.code != 1) {
						this.$message.info(datamessageNum.data.msg);
						return
					}
					let infomessageNum = datamessageNum.data;
					this.messageNum = infomessageNum.data

				}
			},
			//关闭下拉刷新
			guanbiFunc() {
				if (this.isLogin === false) {
					uni.stopPullDownRefresh()
				}
			},
			//获取用户详细信息
			async queryUserInfoFunc() {
				if (this.isLogin === true) {
					//请求方法
					//数据验证

					let datauserInfo = await this.$api.get(global.apiUrls.post5c78c4772da97, {

					});

					if (datauserInfo.data.code != 1) {
						this.$message.info(datauserInfo.data.msg);
						return
					}
					let infouserInfo = datauserInfo.data;
					this.userInfo = infouserInfo.data

				}
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(image-path('512.png')) no-repeat;
		background-size: 100% auto;
	}

	.myhb_flex_0 {
		background: url(image-path('512.png')) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.myhb_fd0_1 {
		color: var(--benbenFontColor3);
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.myhb_fd0_0 {
		width: 200rpx;
		height: 88rpx;
	}

	.myhb_flex_1 {
		padding: 24rpx 32rpx 30rpx 32rpx;
	}

	.myhb_fd1_0_c1_c1_c0_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: #FFFFFF;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.myhb_fd1_0_c0_c2 {
		width: 14rpx;
		height: 26rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd1_0_c0_c1_c1_c0 {
		font-size: 24rpx;
		font-weight: 500;
		color: var(--benbenFontColor3);
	}

	.myhb_fd1_0_c0_c1_c1 {
		margin: 8rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd1_0_c0_c1_c0 {
		font-size: 32rpx;
		font-weight: 700;
		color: #FFFFFF;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 0rpx 0rpx 20rpx 0rpx;
		line-height: 50rpx;
	}

	.myhb_fd1_0_c0_c1 {
		margin: 0rpx 0rpx 0rpx 20rpx;
	}

	.myhb_fd1_0_c0_c0 {
		width: 137rpx;
		height: 137rpx;
		border-radius: 24rpx;
	}

	.myhb_flex_2 {
		background: var(--benbenbgColor1);
		width: 100%;
		background-size: 100% auto;
		border-radius: 24rpx 24rpx 0rpx 0rpx;
	}

	.myhb_fd2_0_c0_c1_c0 {
		width: 14rpx;
		height: 26rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.myhb_fd2_0_c0_c0_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 500;
	}

	.myhb_fd2_0_c0 {
		width: 200%;
		height: 150rpx;
	}

	.myhb_fd2_0 {
		width: 686rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}
</style>